------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/wesleyblundell/Dropbox/Wes_Supplemental_NEI/JAERE_Replication/Replication_package/log/Table_4_Col1And4.log
  log type:  text
 opened on:  17 May 2024, 08:04:28

. use "$rootpath/processed_data/Estimation_Data.dta", clear

. drop if key_estimation_sample==0
(273,947 observations deleted)

. reghdfe  log_emissions4 treatXpost, absorb(facility_id n5#year) vce(cluster facility_id)
(MWFE estimator converged in 248 iterations)

HDFE Linear regression                            Number of obs   =    699,013
Absorbing 2 HDFE groups                           F(   1,  81431) =      57.16
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9415
                                                  Adj R-squared   =     0.9331
                                                  Within R-sq.    =     0.0004
Number of clusters (facility_id) =     81,432     Root MSE        =     0.3081

                       (Std. Err. adjusted for 81,432 clusters in facility_id)
------------------------------------------------------------------------------
             |               Robust
log_emissi~4 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  treatXpost |  -.0668563   .0088431    -7.56   0.000    -.0841888   -.0495239
       _cons |   .7145419   .0015155   471.50   0.000     .7115716    .7175122
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
 facility_id |     81432       81432           0    *|
     n5#year |      6834           0        6834     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. reghdfe  log_damage55 treatXpost, absorb(facility_id n5#year) vce(cluster facility_id)
(MWFE estimator converged in 245 iterations)

HDFE Linear regression                            Number of obs   =    699,013
Absorbing 2 HDFE groups                           F(   1,  81431) =      47.12
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.9406
                                                  Adj R-squared   =     0.9320
                                                  Within R-sq.    =     0.0003
Number of clusters (facility_id) =     81,432     Root MSE        =     0.3625

                       (Std. Err. adjusted for 81,432 clusters in facility_id)
------------------------------------------------------------------------------
             |               Robust
log_damage55 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  treatXpost |  -.0685983   .0099929    -6.86   0.000    -.0881843   -.0490123
       _cons |   .8683538   .0017125   507.06   0.000     .8649972    .8717103
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
 facility_id |     81432       81432           0    *|
     n5#year |      6834           0        6834     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. summarize treatXpost if post==1&e(sample)==1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
  treatXpost |    335,334    .3572315    .1749473          0          1

. gen mean_treat=r(mean)

. summarize tot_damage if e(sample)==1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
  tot_damage |    699,013     1437418    1.47e+07          0   4.86e+09

. //Note the bottom is the total over 10 years. 
. //So divide by 10 for the annual amount in the abstract. 
. display mean_treat*r(N)*_b[treatXpost]*r(mean)
-2.462e+10

. reghdfe  log_emissions4 treatXpost, absorb(facility_id n5#year) vce(cluster state_number)
(MWFE estimator converged in 248 iterations)

HDFE Linear regression                            Number of obs   =    699,013
Absorbing 2 HDFE groups                           F(   1,     47) =       3.58
Statistics robust to heteroskedasticity           Prob > F        =     0.0646
                                                  R-squared       =     0.9415
                                                  Adj R-squared   =     0.9331
                                                  Within R-sq.    =     0.0004
Number of clusters (state_number) =         48    Root MSE        =     0.3081

                          (Std. Err. adjusted for 48 clusters in state_number)
------------------------------------------------------------------------------
             |               Robust
log_emissi~4 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  treatXpost |  -.0668563   .0353254    -1.89   0.065     -.137922    .0042093
       _cons |   .7145419   .0060538   118.03   0.000     .7023632    .7267206
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
 facility_id |     81432       81432           0    *|
     n5#year |      6834           0        6834     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. reghdfe  log_damage55 treatXpost, absorb(facility_id n5#year) vce(cluster state_number)
(MWFE estimator converged in 245 iterations)

HDFE Linear regression                            Number of obs   =    699,013
Absorbing 2 HDFE groups                           F(   1,     47) =       4.67
Statistics robust to heteroskedasticity           Prob > F        =     0.0358
                                                  R-squared       =     0.9406
                                                  Adj R-squared   =     0.9320
                                                  Within R-sq.    =     0.0003
Number of clusters (state_number) =         48    Root MSE        =     0.3625

                          (Std. Err. adjusted for 48 clusters in state_number)
------------------------------------------------------------------------------
             |               Robust
log_damage55 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  treatXpost |  -.0685983   .0317379    -2.16   0.036    -.1324467   -.0047499
       _cons |   .8683538    .005439   159.65   0.000     .8574119    .8792956
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
 facility_id |     81432       81432           0    *|
     n5#year |      6834           0        6834     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

. log close
      name:  <unnamed>
       log:  /Users/wesleyblundell/Dropbox/Wes_Supplemental_NEI/JAERE_Replication/Replication_package/log/Table_4_Col1And4.log
  log type:  text
 closed on:  17 May 2024, 08:06:15
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
